package com.lanou.horo.zhuizhui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lanou.horo.zhuizhui.utility.factory.PictureFragmentFactory;

/**
 * Created by dllo on 15/10/28.
 */
public class PicturePageTitleAdapter extends FragmentPagerAdapter {

    private String[] title = {"最新", "最热"};

    public PicturePageTitleAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return PictureFragmentFactory.createFragment(position);
    }

    @Override
    public int getCount() {
        return title.length;
    }

    public CharSequence getPageTitle(int position) {
        return title[position];

    }
}
